﻿namespace ASP.NetAjaxApplication.Models
{
    public static class Repository
    {
        private static RuleRepository _ruleRepository = null;
        public static RuleRepository Rule { 
            get
            {
                return _ruleRepository ?? (_ruleRepository = new RuleRepository());    
            }
        }

        private static ListRepository _listRepository = null;
        public static ListRepository List
        {
            get
            {
                return _listRepository ?? (_listRepository = new ListRepository());
            }
        }

        private static LineItemRepository _lineItemRepository = null;
        public static LineItemRepository LineItems
        {
            get
            {
                return _lineItemRepository ?? (_lineItemRepository = new LineItemRepository());
            }
        }

        private static OrderRepository _orderRepository = null;
        public static OrderRepository Order
        {
            get
            {
                return _orderRepository ?? (_orderRepository = new OrderRepository());
            }
        }
    }
}